package com.ny.wlw;
import java.util.Scanner;
public class Test02 {
    public static void main(String[] args) {
        int money = 100; // 商品金额
        System.out.println("你消费的金额是" + money);
        System.out.println("请选择支付方式：1.银行卡 2.微信 3.支付宝");

        Scanner scanner = new Scanner(System.in);


        switch (scanner.nextInt()) {
            case 1:
                Pay bankpay = new BankPay();
                bankpay.pay(money);
                break;
            case 2:
                System.out.println("扣除的是微信");
                break;
            case 3:
                System.out.println("扣除的是支付宝");
                break;

        }
    }
}